/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ASAExpr;

import exception.DivisionByZeroException;
import exception.VariableNonDeclareeException;

/**
 *
 * @author FM & KB
 */
public class ASAExprOu extends ASAExprComparaison {

    public ASAExprOu(ASAExpr e1, ASAExpr e2) {
        super(e1, e2);
    }

    @Override
    public int evalue()  throws VariableNonDeclareeException, DivisionByZeroException{
        if (partieGauche.evalue() != 0) {
            return 1;
        } else {
            if (partieDroite.evalue() != 0) {
                return 1;
            } else {
                return 0;
            }
        }
    }

    @Override
    public String getLabelExplorateur() {
        return "OU";
    }
}
